package com.eco.common.response;

import io.swagger.annotations.ApiModel;

@ApiModel("分页响应实体")
public class PageResponse<T> extends BaseResponse<T> {
    private Long total = 0L;

    public PageResponse() {
    }

    public Long getTotal() {
        return this.total;
    }

    public void setTotal(final Long total) {
        this.total = total;
    }

    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof PageResponse)) {
            return false;
        } else {
            PageResponse<?> other = (PageResponse)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$total = this.getTotal();
                Object other$total = other.getTotal();
                if (this$total == null) {
                    if (other$total != null) {
                        return false;
                    }
                } else if (!this$total.equals(other$total)) {
                    return false;
                }

                return true;
            }
        }
    }

    @Override
    protected boolean canEqual(final Object other) {
        return other instanceof PageResponse;
    }

    @Override
    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $total = this.getTotal();
        result = result * 59 + ($total == null ? 43 : $total.hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "PageResponse(total=" + this.getTotal() + ")";
    }
}